package com.startupwebapp.services.general;

import java.util.Set;

import org.springframework.beans.factory.annotation.Autowired;

import com.startupwebapp.core.domain.users.Person;
import com.startupwebapp.services.InitService;
import com.startupwebapp.services.PersonService;

public class InitServiceImpl implements InitService {
	@Autowired
	private PersonService personService;
	private Set<Person> defaultUsers;

	public InitServiceImpl() {
	}

	public void init() {
		for (Person person : defaultUsers) {
			personService.savePerson(person);
		}
	}

	public PersonService getPersonService() {
		return personService;
	}

	public void setPersonService(PersonService personService) {
		this.personService = personService;
	}

	public Set<Person> getDefaultUsers() {
		return defaultUsers;
	}

	public void setDefaultUsers(Set<Person> defaultUsers) {
		this.defaultUsers = defaultUsers;
	}

}
